import request from '@/utils/request'

// 查询InviteCode列表
export function genInviteCode(query) {
  return request({
    url: '/tenant/invite-code/gen',
    method: 'get',
    params: query
  })
}

export function listInviteCode(query) {
  return request({
    url: '/tenant/invite-code/list',
    method: 'get',
    params: query
  })
}


// 查询InviteCode详细
export function getInviteCode(id) {
  return request({
    url: '/tenant/invite-code/' + id,
    method: 'get'
  })
}

// 新增InviteCode
export function addInviteCode(data) {
  return request({
    url: '/tenant/invite-code',
    method: 'post',
    data: data
  })
}

// 修改InviteCode
export function updateInviteCode(data) {
  return request({
    url: '/tenant/invite-code',
    method: 'put',
    data: data
  })
}

// 删除InviteCode
export function delInviteCode(id) {
  return request({
    url: '/tenant/invite-code/' + id,
    method: 'delete'
  })
}
